/*
package org.itboys.mobile.controller.web;

import org.itboys.commons.CommonConstants;
import org.itboys.commons.dto.ResultPageDOHelper;
import org.itboys.commons.utils.ajax.AjaxUtils;
import org.itboys.framework.spring.controller.BaseController;
import org.itboys.mobile.dto.SundayPermissionDto;
import org.itboys.mobile.service.mongo.web.SundayAdvertisementZoneService;
import org.itboys.mobile.service.mongo.web.SundayPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

*/
/**
 * 作者：jiangxiong
 * 日期：2017年5月8日
 * 联系方式 ：empty90911@126.com
 * 描述：圣代_权限_controller_web
 *
 *//*

@Controller
@RequestMapping("/sunday/web/permission")
public class SundayPermissionController extends BaseController {

    @Autowired
    private SundayPermissionService permissionService;
    @Autowired
    private SundayAdvertisementZoneService advertisementZoneService;




    */
/**
     * 商品权限（含库存和价格）
     * @param request
     * @param model
     * @return
     *//*

    @RequestMapping("/index" )
    public  String index(HttpServletRequest request,
                         @RequestParam(value="memberId",required=true) Long memberId,
                           Model model){
        model.addAttribute("memberId",memberId);
        return "/sunday/permission/index";
    }

    */
/**
     * 用户获取分类-小分类-商品树，（含库存和价格）
     * @param request
     * @param response
     * @param memberId
     *//*

    @RequestMapping("/getTree")
    public void getTree(HttpServletRequest request,
                             HttpServletResponse response,
                             @RequestParam(value="memberId",required=true) Long memberId
    ) {
        try {
            List<SundayPermissionDto> tree = permissionService.getPermissionTree(memberId);
            AjaxUtils.renderJson(response, tree);

        } catch (Exception e) {
            e.printStackTrace();
            AjaxUtils.renderJsonporJson(response, null,
                    ResultPageDOHelper.getMsgCodeResultDO(CommonConstants.FAIL_CODE, CommonConstants.FAIL));
        }
    }
    */
/**
     * 修改商品库存和价格
     * @param request
     * @param response
     * @param id
     *//*

    @RequestMapping("/change")
    public void change(HttpServletRequest request,
                              HttpServletResponse response,
                       @RequestParam(value="memberId",required=true) Long memberId,
                              @RequestParam(value="id",required=true) Long id,
                              @RequestParam(value="price",required=false) Double price,
                              @RequestParam(value="store",required=false) Integer store,
                             @RequestParam(value="productId",required=true) Long productId

    ) {
        try {
           permissionService.change(memberId,id,price,store,productId);
            AjaxUtils.renderJsonporJson(response, null,
                    ResultPageDOHelper.getMsgCodeResultDO(CommonConstants.SUCCESS_CODE, CommonConstants.SUCCESS));
        } catch (Exception e) {
            e.printStackTrace();
            String msg = "";
            if (e.getClass().getSimpleName().equalsIgnoreCase("ErrorException")) {
                msg = e.getMessage();
            } else {
                msg = CommonConstants.ERROMSG;
                logger.error("/sunday/web/permission/change------" + e.getMessage());
                e.printStackTrace();
            }
            AjaxUtils.renderJsonporJson(response, null,
                    ResultPageDOHelper.getMsgCodeResultDO(CommonConstants.FAIL_CODE, CommonConstants.FAIL));
        }
    }
}
*/
